<template>
  <el-form-item :label="i18nt('designer.setting.fileTypes')">
    <el-input v-model="types" type="text" />
  </el-form-item>
</template>

<script>
import i18n from "Yan/utils/i18n";
import propertyMixin from "../propertyMixin";

export default {
  name: "fileTypes-editor",
  mixins: [i18n, propertyMixin],
  props: {
    designer: Object,
    optionModel: Object,
  },
  data() {
    return {
      types: "",
    };
  },
  watch: {
    types(n) {
      this.optionModel.fileTypes = n.split(",");
    },
  },
  mounted() {
    this.types = this.optionModel.fileTypes.join(",");
  },
};
</script>

<style scoped>
</style>
